import { Component, OnInit } from '@angular/core';
import {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';

@Component({
  selector: 'app-setpass',
  templateUrl: './setpass.component.html',
  styleUrls: ['./setpass.component.css']
})
export class SetpassComponent implements OnInit {
  oldpass:string;
  newpass:string;
  repass:string;
  constructor(
    public activeModal: NgbActiveModal) { }

  ngOnInit(): void {
  }

  save(){
    if(this.newpass!=this.repass){
      alert("两次密码输入不一致");
    }
    else {
      let result={
        "oldpass":this.oldpass,
        "newpass":this.newpass
      }
      this.activeModal.close(result);
    }
  }


}
